// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store.js'

// import {AlertPlugin} from 'vux';
// Vue.use(AlertPlugin);

Vue.config.productionTip = false;
import Alert from './components/Alert.vue';
Vue.component("Alert",Alert);

Vue.filter("account",function(u){
  var last = u.substr(u.length-1,1);
  var usernum = u.substring(u.length-4);

  return "面粉"+last+'_'+usernum;
});


/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})


function resetREM(){
  var w = window.innerWidth;
  var size = w/360;
  document.documentElement.style.fontSize = size*16 + "px";
}
resetREM();

window.onresize = resetREM();

window.onorientationchange = resetREM();
